//@ts-ignore
import request from '@/utils/request';
//@ts-ignore
import {
  CartListRequestData,
  ResponseData,
  AddCartRequestData,
  DelateCartRequestData
} from "@/api/cart/type";

/**
 * 购物车接口集合
 */
enum API {
  CART_LIST_URL = '/card/list',
  ADDCART_URL = '/card/add',
  UPDATECART_URL = '/card/delete',
}

export const reqCartList = (data: CartListRequestData) =>
    request.post<any, ResponseData>(API.CART_LIST_URL, data)

export const reqAddCart = (data: AddCartRequestData) =>
    request.post<any, ResponseData>(API.ADDCART_URL, data)

export const reqDelateCart = (data: DelateCartRequestData) =>
    request.post<any, ResponseData>(API.UPDATECART_URL, data)




